.blogs-section {
  padding: 4rem 2rem;
  background-color: #f8f9fa;
  min-height: 100vh;
}

.blogs-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

/* 分类筛选样式 */
.category-filter {
  display: flex;
  justify-content: flex-start;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding: 0 1rem;
  border-bottom: 1px solid #eee;
}

.category-button {
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  position: relative;
}

.category-button:hover {
  color: #1890ff;
}

.category-button.active {
  color: #1890ff;
  font-weight: 500;
}

.category-button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #1890ff;
}

/* 博客列表布局 */
.blogs-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 0 1rem;
  max-height: calc(100vh - 300px); /* 动态计算高度 */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #1890ff #f0f0f0;
  padding-right: 16px; /* 增加滚动条空间 */
  position: relative;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth; /* 平滑滚动 */
}

/* 自定义滚动条样式 */
.blogs-grid::WebkitScrollbar {
  width: 8px;
}

.blogs-grid::WebkitScrollbarTrack {
  background: #f0f0f0;
  border-radius: 4px;
}

.blogs-grid::WebkitScrollbarThumb {
  background: #1890ff;
  border-radius: 4px;
}

.blogs-grid::WebkitScrollbarThumb:hover {
  background: #40a9ff;
}

/* 博客卡片样式 */
.blog-item {
  display: flex;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  padding: 1.5rem;
  min-height: 160px; /* 固定最小高度 */
  gap: 1.5rem;
}

.blog-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


.blog-title {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  color: #333;
  font-weight: 500;
  line-height: 1.3;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #666;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.blog-meta span {
  color: #000;
  font-weight: 500;
}

.blog-author,
.blog-category {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-price {
  color: #f5222d;
  font-weight: bold;
  font-size: 1.1rem;
}

/* 加载指示器样式 */
.loading-container {
  text-align: center;
  padding: 2rem;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .blogs-section {
    padding: 2rem 1rem;
  }

  .blog-item {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }

  .blog-image {
    width: 100%;
    height: 180px;
    margin-right: 0;
    margin-bottom: 0;
    object-fit: cover;
    border-radius: 8px;
  }

  @media (max-width: 768px) {
    .blog-image {
      max-height: 250px;
    }
  }

  @media (max-width: 480px) {
    .blog-image {
      max-height: 200px;
    }
  }

  .blog-title {
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .blog-meta {
   /*  flex-wrap: wrap;
    gap: 1rem; */
    display: none;
  }

  .blogs-grid {
    max-height: none; /* 移动端取消固定高度 */
  }
}

@media (max-width: 480px) {
  .caegory-filter {
    gap: 1rem;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .category-button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    white-space: nowrap;
  }
}